<include file="Public/head" xmlns="http://www.w3.org/1999/html"/>
<include file="Public/common_header" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/css/cashier.css" />
<script type="text/javascript">
    $(function(){
        $("input").placeholder();
        if (navigator.userAgent.indexOf("Safari") > -1) {
            $("input").css("lineHeight","normal !important");
        };
    });
</script>
<div class="mian">
    <include file="Public/sidebar" menu="cggl.cgdlb"  />
    <div class="dispute">
        <ul>
            <input type="hidden" name="id" value="{$data.purchase_order.id}">
            <li><span>车辆名称：</span><h4>{$data.car_info.model_show}</h4></li>
            <li><span>拍单号：</span><h4>{$data.purchase_order.order_no}</h4></li>
            <li class="dispute-shoot"><span>*争议原因</span><h4>过户延时</h4></li>
            <li class="dispute-remark"><span>备注说明：</span><textarea id="remark" placeholder=""></textarea></li>
        </ul>
    </div>
    <div class="yongBtn clearfix">
        <input type="hidden" name="re_auction_type" value="">
        <input type="hidden" name="first_money" value="">
        <input type="button" value="提交" onclick="save_dispute();" class="queding">
        <input class="quxiao" type="button" value="取消" onclick="cancel();">
    </div>
    <div class="clear"></div>
</div>
<script>

    // 提交争议
    function save_dispute() {
        var purchase_order_id = $("input[name='id']").val();
        var param = {};

        var remark = $('#remark').val();
        if(remark == "" || remark == null){
            shibai_alert('备注不能为空',500);
            return;
        }
        param = {
            'id':purchase_order_id,
            'remark':remark,
        };
        var btn_obj = $(this);
        btn_obj.val("提交中...").attr("disabled",'disabled');
        $.post("/PurchaseOrder/saveDispute",param,function(data){
            if(data.code!=200){
                shibai_alert(data.msg,1500);
                btn_obj.val("确定").removeAttr("disabled style");
                return false;
            }
            btn_alert("提交成功",1500,function () {
                cancel();
            });
        },"json");
    }

    //取消
    function cancel() {
        window.location.href = '/PurchaseOrder/purchase_order_list';
    }


</script>
<include file="Public/foot" />